import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import shop from '../components/applyManager/shop/shop'
import apply from '../components/applyManager/apply/apply'
import article from '../components/articleManager/article/article.vue'
import examine from '../components/articleManager/examine/examine.vue'
import person from '../components/personManager/person/person.vue'
import phone from '../components/phoneManager/phone/phone.vue'
import login from '../components/login.vue'
Vue.use(Router)
const originalPush = Router.prototype.push

Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      children:[
        {name:'1-1',path:'/shop',component:shop},
        {name:'1-2',path:'/apply',component:apply},
		{name:'2-1',path:'/article',component:article},
		// {name:'2-2',path:'/examine',component:examine},
		{name:'3-1',path:'/person',component:person},
		{name:'4-1',path:'/phone',component:phone}
      ]
    },
	{
	  path: '/login',
	  name: 'login',
	  component: login,
	}
  ]
})
